package com.six.vo;

import java.sql.Date;

import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

/**
 * 用户组权限分配表
 * 
 */
@Entity
@Table(name="WMS_T_PERM_GROUP")
public class GroupPermission {
	private int pgID;// VARCHAR(16) 编号
	private Date pgDate;// DATE 分配时间
	private Group group;
	private Permission permission;
	
	public GroupPermission() {
		super();
	}
	public GroupPermission(int pgID, Date pgDate, Group group,
			Permission permission) {
		super();
		this.pgID = pgID;
		this.pgDate = pgDate;
		this.group = group;
		this.permission = permission;
	}
	@Id
	@GeneratedValue
	public int getPgID() {
		return pgID;
	}
	public void setPgID(int pgID) {
		this.pgID = pgID;
	}
	public Date getPgDate() {
		return pgDate;
	}
	public void setPgDate(Date pgDate) {
		this.pgDate = pgDate;
	}
	@ManyToOne
	@JoinColumn(name="groupID")// VARCHAR(16) 用户编号
	public Group getGroup() {
		return group;
	}
	public void setGroup(Group group) {
		this.group = group;
	}
	@ManyToOne
	@JoinColumn(name="permID")// VARCHAR(16) 权限编号
	public Permission getPermission() {
		return permission;
	}
	public void setPermission(Permission permission) {
		this.permission = permission;
	}

}
